package com.lyj.mapper;

import com.lyj.pojo.Nurse;
import com.lyj.pojo.OldMan;
import com.lyj.pojo.Satisfaction;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface OldManMapper {

    List<OldMan> queryAllOldMan();
    List<OldMan> queryOldManByName(String oldName);
    Boolean addOldMan(OldMan oldMan);
    Boolean delOldManById(int oldId);
    //修改老人记录
    Boolean updateOldManById(OldMan oldMan);

    //addOldMan，查询管理老人人数的护工排名
    List querySatisNurseId(int oldId);
    //加入评价表
    Boolean addSatisfaction(int oldId,int nurse1,int nurse2,int nurse3,int nurse4,int nurse5);
    //删除老人时同时删除评价表
    Boolean delOldManStatis(int oldId);

    //查询备用护工表
    Satisfaction queryStatisByOldId(int oldId);
    //查询护工姓名
    Nurse queryNurse(int nurseId);
    //修改备用护工
    Boolean updateBysatisId(Satisfaction satisfaction);


}
